//
//  DoubleExtension.swift
//  QianPing
//
//  Created by Apple on 2019/4/29.
//  Copyright © 2019 yanglipeng. All rights reserved.
//

import UIKit

extension Double {
    //取小数点后1位
    func stringOfOnePoint() -> String {
        return String.init(format: "%.1f", arguments: [self])
    }
    func stringOfTwoPoint() -> String {
        return String.init(format: "%.2f", arguments: [self])
    }
    func stringOfNoPoint() -> String {
        return String.init(format: "%.0f", arguments: [self])
    }
}
